<script>

    const age = 12
    const name = "Lucy"

    //传统方式定义对象
    const p1 = {name:name,age:age}
    // console.log(p1)

    //es6定义对象
    const p2 ={name,age}

    console.log(p2)
</script>